﻿import SuperMap from '../../SuperMap';
import Collection from './Collection';
import LineString from './LineString';


/**
 * @class SuperMap.Geometry.MultiLineString
 * @classdesc 几何对象多线类。
 * @extends {SuperMap.Geometry.Collection}
 * @param components - {Array<SuperMap.Geometry.LineString>} LineString数组。
 * @example 
 * var multi = new SuperMap.Geometry.MultiLineString([
 *      new SuperMap.Geometry.LineString([
 *          new SuperMap.Geometry.Point(1, 0),
 *          new SuperMap.Geometry.Point(0, 1)
 *      ])
 *  ]);
 */
export default class MultiLineString extends Collection {

    /**
     * @member SuperMap.Geometry.MultiLineString.prototype.componentTypes -{Array<string>}
     * @description components存储的的几何对象所支持的几何类型数组,为空表示类型不受限制。
     * @readonly
     * @default ["{@link SuperMap.Geometry.LineString}"]
     */
    componentTypes = ["SuperMap.Geometry.LineString"];

    constructor(components) {
        super(components);
    }

    CLASS_NAME = "SuperMap.Geometry.MultiLineString"
}
SuperMap.Geometry.MultiLineString = MultiLineString;